package com.neuedu.corejava.ch8.homework;

import java.util.Scanner;

public class NullPointerException extends Exception {
	public NullPointerException(){
		
	}
	
	public static void testString(String string1,String string2){
		if(string1==null || string2==null){
			try {
				throw new NullPointerException();
			} catch (NullPointerException e) {
				e.printStackTrace();
			}
		}
	}
	
	public static void main(String[] args) {
//		Scanner scanner=new Scanner(System.in);
//		String string1=scanner.next();
//		String string2=scanner.next();
		String string1="aaa";
		String string2=null;
		testString(string1, string2);
		
	}

}
